<script language="javascript" type="text/javascript" src="./script/script-friendgroup.js"></script>
<style>
	#group_panel{
		background:#333;
		color:#FFF;
		margin-top: -9px;
		line-height: 23px;
		width: 200px;
		position:absolute;
	}
	#group_panel div{
		padding: 3px 0;
	}
	#group_panel_list{
		padding: 7px 10px 5px 10px;
	}
	#group_panel_list li{
		
	}
	#group_panel_list li a div{
		width:185px;
		cursor:pointer;
		background:#777;
		padding: 3px 10px 3px 10px;
		border-bottom: 1px #666 solid;
		overflow:hidden;
		color:#FFF;
		line-height: 23px;
	}
	#group_panel_list li a div:hover{
		background:#aaa;
	}
	#group_panel img{
		vertical-align:middle;
	}
	
	fieldset {
		margin-left: 220px;
	}
	#content_newgroup{
		display:none;
	}
	#group_panel_list li a div.active_group{
		background: #888;
	}
	#group_panel_list li a div.active_group:hover{
		background: #aaa;
	}
	#bt_edit_group{
		float:right;
		height: 22px;
		line-height: 22px;
		width: 100px;
		text-align:center;
	}
	#bt_edit_member{
		float:right;
		clear:left;
		margin-left: 5px;
		margin-right: 15px;
		height: 22px;
		line-height: 22px;
		width: 190px;
		text-align:center;
	}
	#bt_edit_member img, #bt_edit_group img{
		vertical-align:middle;
	}
	#form_edit_group{
		border: 1px #FC9 solid; 
		background-color:#FFF8E1;
		margin-bottom: 10px;
	}
</style>
<?php
if(isset($_SESSION[sess_login]))
{
	if(isset($_GET['gid']) && $_GET['gid'] != ''){
		$group_load = $_GET['gid'];
	}
	else {
		$group_load = 'all';
	}
	
	if($group_load == 'all'){$active_group = ' class="active_group"';} else {$active_group = '';}
?>
<div id='group_panel'>
    <ul id="group_panel_list">
    		<script> load_group('?p=<?=$_GET['p']?>&m=<?=$_GET['m']?>&gid=','<?=$group_load?>');</script>
            <li id="bt_all_friend"><a href="?p=<?=$_GET['p']?>&m=<?=$_GET['m']?>&gid=all"><div <?=$active_group ?>>All Friends</div></a></li>
            <li id="bt_new_group"><a onclick="javascript:new_group();"><div><img src="./style/default/add_friend.png"> New Group</div></a></li>
    </ul>
    <div align="right"><a>GROUP &nbsp; &nbsp;</a></div>
</div>
<div id="content_newgroup">
   <fieldset>
 <legend> New Group </legend> 
	<div id="new_group">
    </div>
 </fieldset>
</div>
   <fieldset>
 <legend id="name_group_change"> </legend> 
	<div id="my_friend">
    	<script> 
			var hash = window.location.hash.substring(1);
			if(hash == '')	{ hash = 0; }
			load_myfriend('<?=$group_load?>', hash);
        </script>
    </div>
</fieldset>

   <fieldset>
 <legend> New Member </legend> 
	<div id="user_random">
    	<script> load_user();</script>
    </div>
 </fieldset>
 <div id="loadlistfriend" class="smak_onpage"></div>
<?php
}
else{
	echo "<br />Wrong variables ! <br />";
}
?>